package textFile;
import java.io.*;

public class WriteFile {
	
	public String path;
	public boolean appendFile = false;
	
	public WriteFile(String filePath)
	{
		path = filePath;
	}
	
	public WriteFile(String filePath, boolean appendValue)
	{
		path = filePath;
		appendFile = appendValue;
	}
	
	public void writeToFile(String textLine)throws IOException
	{
		FileWriter write = new FileWriter(path, appendFile);
		PrintWriter printLine = new PrintWriter(write);
		
		printLine.printf("%s" + "%n", textLine);
		printLine.close();
	}


}
